package com.analyst.dto.ui;

import cn.hutool.json.JSONObject;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * ClassName: EdgeUI
 * Package: com.analyst.entity.ui
 * Description:
 *
 * @Author wk
 * @Create 2023/08/7 0007 下午 02:32:20
 * @Version 1.0
 */
@Getter
public class EdgeUI {
    private String source;
    private String target;
    private String color;
    private JSONObject style;

    public EdgeUI(String source, String target) {
        this.source = source;
        this.target = target;
    }

    public String getSource() {
        return source;
    }

    public void setSource(String source) {
        this.source = source;
    }

    public String getTarget() {
        return target;
    }

    public void setTarget(String target) {
        this.target = target;
    }

    public void buildHighLight() {
        this.color = "#00FF00";
        this.style = new JSONObject();
        this.style.set("endArrow", new JSONObject().set("fill", "#00FF00"));
    }
}
